Integrand size = 23, antiderivative size = 116 \[ \int \frac {\csc ^4(e+f x)}{\left (a+b \tan ^2(e+f x)\right )^2} \, dx=-\frac {(3 a-5 b) \sqrt {b} \arctan \left (\frac {\sqrt {b} \tan (e+f x)}{\sqrt {a}}\right )}{2 a^{7/2} f}-\frac {(a-2 b) \cot (e+f x)}{a^3 f}-\frac {\cot ^3(e+f x)}{3 a^2 f}-\frac {(a-b) b \tan (e+f x)}{2 a^3 f \left (a+b \tan ^2(e+f x)\right )} \]
-(a-2*b)*cot(f*x+e)/a^3/f-1/3*cot(f*x+e)^3/a^2/f-1/2*(3*a-5*b)*arctan(b^(1 /2)*tan(f*x+e)/a^(1/2))*b^(1/2)/a^(7/2)/f-1/2*(a-b)*b*tan(f*x+e)/a^3/f/(a+ b*tan(f*x+e)^2)
Time = 1.50 (sec) , antiderivative size = 112, normalized size of antiderivative = 0.97 \[ \int \frac {\csc ^4(e+f x)}{\left (a+b \tan ^2(e+f x)\right )^2} \, dx=\frac {3 \sqrt {b} (-3 a+5 b) \arctan \left (\frac {\sqrt {b} \tan (e+f x)}{\sqrt {a}}\right )+\sqrt {a} \left (-2 \cot (e+f x) \left (2 a-6 b+a \csc ^2(e+f x)\right )+\frac {3 b (-a+b) \sin (2 (e+f x))}{a+b+(a-b) \cos (2 (e+f x))}\right )}{6 a^{7/2} f} \]
(3*Sqrt[b]*(-3*a + 5*b)*ArcTan[(Sqrt[b]*Tan[e + f*x])/Sqrt[a]] + Sqrt[a]*( -2*Cot[e + f*x]*(2*a - 6*b + a*Csc[e + f*x]^2) + (3*b*(-a + b)*Sin[2*(e + f*x)])/(a + b + (a - b)*Cos[2*(e + f*x)])))/(6*a^(7/2)*f)
Time = 0.36 (sec) , antiderivative size = 118, normalized size of antiderivative = 1.02, number of steps used = 7, number of rules used = 6, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.261, Rules used = {3042, 4146, 361, 25, 1584, 2009}
Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.
\(\displaystyle \int \frac {\csc ^4(e+f x)}{\left (a+b \tan ^2(e+f x)\right )^2} \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {1}{\sin (e+f x)^4 \left (a+b \tan (e+f x)^2\right )^2}dx\) |
\(\Big \downarrow \) 4146 |
\(\displaystyle \frac {\int \frac {\cot ^4(e+f x) \left (\tan ^2(e+f x)+1\right )}{\left (b \tan ^2(e+f x)+a\right )^2}d\tan (e+f x)}{f}\) |
\(\Big \downarrow \) 361 |
\(\displaystyle \frac {-\frac {1}{2} b \int -\frac {\cot ^4(e+f x) \left (-\frac {(a-b) \tan ^4(e+f x)}{a^3}+\frac {2 (a-b) \tan ^2(e+f x)}{a^2 b}+\frac {2}{a b}\right )}{b \tan ^2(e+f x)+a}d\tan (e+f x)-\frac {b (a-b) \tan (e+f x)}{2 a^3 \left (a+b \tan ^2(e+f x)\right )}}{f}\) |
\(\Big \downarrow \) 25 |
\(\displaystyle \frac {\frac {1}{2} b \int \frac {\cot ^4(e+f x) \left (-\frac {(a-b) \tan ^4(e+f x)}{a^3}+\frac {2 (a-b) \tan ^2(e+f x)}{a^2 b}+\frac {2}{a b}\right )}{b \tan ^2(e+f x)+a}d\tan (e+f x)-\frac {b (a-b) \tan (e+f x)}{2 a^3 \left (a+b \tan ^2(e+f x)\right )}}{f}\) |
\(\Big \downarrow \) 1584 |
\(\displaystyle \frac {\frac {1}{2} b \int \left (\frac {2 \cot ^4(e+f x)}{a^2 b}+\frac {2 (a-2 b) \cot ^2(e+f x)}{a^3 b}+\frac {5 b-3 a}{a^3 \left (b \tan ^2(e+f x)+a\right )}\right )d\tan (e+f x)-\frac {b (a-b) \tan (e+f x)}{2 a^3 \left (a+b \tan ^2(e+f x)\right )}}{f}\) |
\(\Big \downarrow \) 2009 |
\(\displaystyle \frac {\frac {1}{2} b \left (-\frac {(3 a-5 b) \arctan \left (\frac {\sqrt {b} \tan (e+f x)}{\sqrt {a}}\right )}{a^{7/2} \sqrt {b}}-\frac {2 (a-2 b) \cot (e+f x)}{a^3 b}-\frac {2 \cot ^3(e+f x)}{3 a^2 b}\right )-\frac {b (a-b) \tan (e+f x)}{2 a^3 \left (a+b \tan ^2(e+f x)\right )}}{f}\) |
((b*(-(((3*a - 5*b)*ArcTan[(Sqrt[b]*Tan[e + f*x])/Sqrt[a]])/(a^(7/2)*Sqrt[ b])) - (2*(a - 2*b)*Cot[e + f*x])/(a^3*b) - (2*Cot[e + f*x]^3)/(3*a^2*b))) /2 - ((a - b)*b*Tan[e + f*x])/(2*a^3*(a + b*Tan[e + f*x]^2)))/f
3.1.78.3.1 Defintions of rubi rules used
Int[(x_)^(m_)*((a_) + (b_.)*(x_)^2)^(p_)*((c_) + (d_.)*(x_)^2), x_Symbol] : > Simp[(-a)^(m/2 - 1)*(b*c - a*d)*x*((a + b*x^2)^(p + 1)/(2*b^(m/2 + 1)*(p + 1))), x] + Simp[1/(2*b^(m/2 + 1)*(p + 1)) Int[x^m*(a + b*x^2)^(p + 1)*E xpandToSum[2*b*(p + 1)*Together[(b^(m/2)*(c + d*x^2) - (-a)^(m/2 - 1)*(b*c - a*d)*x^(-m + 2))/(a + b*x^2)] - ((-a)^(m/2 - 1)*(b*c - a*d))/x^m, x], x], x] /; FreeQ[{a, b, c, d}, x] && NeQ[b*c - a*d, 0] && LtQ[p, -1] && ILtQ[m/ 2, 0] && (IntegerQ[p] || EqQ[m + 2*p + 1, 0])
Int[((f_.)*(x_))^(m_.)*((d_) + (e_.)*(x_)^2)^(q_.)*((a_) + (b_.)*(x_)^2 + ( c_.)*(x_)^4)^(p_.), x_Symbol] :> Int[ExpandIntegrand[(f*x)^m*(d + e*x^2)^q* (a + b*x^2 + c*x^4)^p, x], x] /; FreeQ[{a, b, c, d, e, f, m, q}, x] && NeQ[ b^2 - 4*a*c, 0] && IGtQ[p, 0] && IGtQ[q, -2]
Int[sin[(e_.) + (f_.)*(x_)]^(m_)*((a_) + (b_.)*((c_.)*tan[(e_.) + (f_.)*(x_ )])^(n_))^(p_.), x_Symbol] :> With[{ff = FreeFactors[Tan[e + f*x], x]}, Sim p[c*(ff^(m + 1)/f) Subst[Int[x^m*((a + b*(ff*x)^n)^p/(c^2 + ff^2*x^2)^(m/ 2 + 1)), x], x, c*(Tan[e + f*x]/ff)], x]] /; FreeQ[{a, b, c, e, f, n, p}, x ] && IntegerQ[m/2]
Time = 0.77 (sec) , antiderivative size = 100, normalized size of antiderivative = 0.86
method | result | size |
derivativedivides | \(\frac {-\frac {1}{3 a^{2} \tan \left (f x +e \right )^{3}}-\frac {a -2 b}{a^{3} \tan \left (f x +e \right )}-\frac {b \left (\frac {\left (\frac {a}{2}-\frac {b}{2}\right ) \tan \left (f x +e \right )}{a +b \tan \left (f x +e \right )^{2}}+\frac {\left (3 a -5 b \right ) \arctan \left (\frac {b \tan \left (f x +e \right )}{\sqrt {a b}}\right )}{2 \sqrt {a b}}\right )}{a^{3}}}{f}\) | \(100\) |
default | \(\frac {-\frac {1}{3 a^{2} \tan \left (f x +e \right )^{3}}-\frac {a -2 b}{a^{3} \tan \left (f x +e \right )}-\frac {b \left (\frac {\left (\frac {a}{2}-\frac {b}{2}\right ) \tan \left (f x +e \right )}{a +b \tan \left (f x +e \right )^{2}}+\frac {\left (3 a -5 b \right ) \arctan \left (\frac {b \tan \left (f x +e \right )}{\sqrt {a b}}\right )}{2 \sqrt {a b}}\right )}{a^{3}}}{f}\) | \(100\) |
risch | \(\frac {i \left (9 a b \,{\mathrm e}^{8 i \left (f x +e \right )}-15 b^{2} {\mathrm e}^{8 i \left (f x +e \right )}+12 a^{2} {\mathrm e}^{6 i \left (f x +e \right )}-6 a b \,{\mathrm e}^{6 i \left (f x +e \right )}+60 b^{2} {\mathrm e}^{6 i \left (f x +e \right )}+20 a^{2} {\mathrm e}^{4 i \left (f x +e \right )}+4 a b \,{\mathrm e}^{4 i \left (f x +e \right )}-90 b^{2} {\mathrm e}^{4 i \left (f x +e \right )}+4 a^{2} {\mathrm e}^{2 i \left (f x +e \right )}-26 a b \,{\mathrm e}^{2 i \left (f x +e \right )}+60 b^{2} {\mathrm e}^{2 i \left (f x +e \right )}-4 a^{2}+19 a b -15 b^{2}\right )}{3 f \,a^{3} \left ({\mathrm e}^{2 i \left (f x +e \right )}-1\right )^{3} \left (a \,{\mathrm e}^{4 i \left (f x +e \right )}-b \,{\mathrm e}^{4 i \left (f x +e \right )}+2 a \,{\mathrm e}^{2 i \left (f x +e \right )}+2 b \,{\mathrm e}^{2 i \left (f x +e \right )}+a -b \right )}+\frac {3 \sqrt {-a b}\, \ln \left ({\mathrm e}^{2 i \left (f x +e \right )}+\frac {2 i \sqrt {-a b}+a +b}{a -b}\right )}{4 a^{3} f}-\frac {5 \sqrt {-a b}\, \ln \left ({\mathrm e}^{2 i \left (f x +e \right )}+\frac {2 i \sqrt {-a b}+a +b}{a -b}\right ) b}{4 a^{4} f}-\frac {3 \sqrt {-a b}\, \ln \left ({\mathrm e}^{2 i \left (f x +e \right )}-\frac {2 i \sqrt {-a b}-a -b}{a -b}\right )}{4 a^{3} f}+\frac {5 \sqrt {-a b}\, \ln \left ({\mathrm e}^{2 i \left (f x +e \right )}-\frac {2 i \sqrt {-a b}-a -b}{a -b}\right ) b}{4 a^{4} f}\) | \(435\) |
1/f*(-1/3/a^2/tan(f*x+e)^3-(a-2*b)/a^3/tan(f*x+e)-1/a^3*b*((1/2*a-1/2*b)*t an(f*x+e)/(a+b*tan(f*x+e)^2)+1/2*(3*a-5*b)/(a*b)^(1/2)*arctan(b*tan(f*x+e) /(a*b)^(1/2))))
Leaf count of result is larger than twice the leaf count of optimal. 249 vs. \(2 (102) = 204\).
Time = 0.32 (sec) , antiderivative size = 587, normalized size of antiderivative = 5.06 \[ \int \frac {\csc ^4(e+f x)}{\left (a+b \tan ^2(e+f x)\right )^2} \, dx=\left [-\frac {4 \, {\left (4 \, a^{2} - 19 \, a b + 15 \, b^{2}\right )} \cos \left (f x + e\right )^{5} - 8 \, {\left (3 \, a^{2} - 14 \, a b + 15 \, b^{2}\right )} \cos \left (f x + e\right )^{3} + 3 \, {\left ({\left (3 \, a^{2} - 8 \, a b + 5 \, b^{2}\right )} \cos \left (f x + e\right )^{4} - {\left (3 \, a^{2} - 11 \, a b + 10 \, b^{2}\right )} \cos \left (f x + e\right )^{2} - 3 \, a b + 5 \, b^{2}\right )} \sqrt {-\frac {b}{a}} \log \left (\frac {{\left (a^{2} + 6 \, a b + b^{2}\right )} \cos \left (f x + e\right )^{4} - 2 \, {\left (3 \, a b + b^{2}\right )} \cos \left (f x + e\right )^{2} - 4 \, {\left ({\left (a^{2} + a b\right )} \cos \left (f x + e\right )^{3} - a b \cos \left (f x + e\right )\right )} \sqrt {-\frac {b}{a}} \sin \left (f x + e\right ) + b^{2}}{{\left (a^{2} - 2 \, a b + b^{2}\right )} \cos \left (f x + e\right )^{4} + 2 \, {\left (a b - b^{2}\right )} \cos \left (f x + e\right )^{2} + b^{2}}\right ) \sin \left (f x + e\right ) - 12 \, {\left (3 \, a b - 5 \, b^{2}\right )} \cos \left (f x + e\right )}{24 \, {\left ({\left (a^{4} - a^{3} b\right )} f \cos \left (f x + e\right )^{4} - a^{3} b f - {\left (a^{4} - 2 \, a^{3} b\right )} f \cos \left (f x + e\right )^{2}\right )} \sin \left (f x + e\right )}, -\frac {2 \, {\left (4 \, a^{2} - 19 \, a b + 15 \, b^{2}\right )} \cos \left (f x + e\right )^{5} - 4 \, {\left (3 \, a^{2} - 14 \, a b + 15 \, b^{2}\right )} \cos \left (f x + e\right )^{3} - 3 \, {\left ({\left (3 \, a^{2} - 8 \, a b + 5 \, b^{2}\right )} \cos \left (f x + e\right )^{4} - {\left (3 \, a^{2} - 11 \, a b + 10 \, b^{2}\right )} \cos \left (f x + e\right )^{2} - 3 \, a b + 5 \, b^{2}\right )} \sqrt {\frac {b}{a}} \arctan \left (\frac {{\left ({\left (a + b\right )} \cos \left (f x + e\right )^{2} - b\right )} \sqrt {\frac {b}{a}}}{2 \, b \cos \left (f x + e\right ) \sin \left (f x + e\right )}\right ) \sin \left (f x + e\right ) - 6 \, {\left (3 \, a b - 5 \, b^{2}\right )} \cos \left (f x + e\right )}{12 \, {\left ({\left (a^{4} - a^{3} b\right )} f \cos \left (f x + e\right )^{4} - a^{3} b f - {\left (a^{4} - 2 \, a^{3} b\right )} f \cos \left (f x + e\right )^{2}\right )} \sin \left (f x + e\right )}\right ] \]
[-1/24*(4*(4*a^2 - 19*a*b + 15*b^2)*cos(f*x + e)^5 - 8*(3*a^2 - 14*a*b + 1 5*b^2)*cos(f*x + e)^3 + 3*((3*a^2 - 8*a*b + 5*b^2)*cos(f*x + e)^4 - (3*a^2 - 11*a*b + 10*b^2)*cos(f*x + e)^2 - 3*a*b + 5*b^2)*sqrt(-b/a)*log(((a^2 + 6*a*b + b^2)*cos(f*x + e)^4 - 2*(3*a*b + b^2)*cos(f*x + e)^2 - 4*((a^2 + a*b)*cos(f*x + e)^3 - a*b*cos(f*x + e))*sqrt(-b/a)*sin(f*x + e) + b^2)/((a ^2 - 2*a*b + b^2)*cos(f*x + e)^4 + 2*(a*b - b^2)*cos(f*x + e)^2 + b^2))*si n(f*x + e) - 12*(3*a*b - 5*b^2)*cos(f*x + e))/(((a^4 - a^3*b)*f*cos(f*x + e)^4 - a^3*b*f - (a^4 - 2*a^3*b)*f*cos(f*x + e)^2)*sin(f*x + e)), -1/12*(2 *(4*a^2 - 19*a*b + 15*b^2)*cos(f*x + e)^5 - 4*(3*a^2 - 14*a*b + 15*b^2)*co s(f*x + e)^3 - 3*((3*a^2 - 8*a*b + 5*b^2)*cos(f*x + e)^4 - (3*a^2 - 11*a*b + 10*b^2)*cos(f*x + e)^2 - 3*a*b + 5*b^2)*sqrt(b/a)*arctan(1/2*((a + b)*c os(f*x + e)^2 - b)*sqrt(b/a)/(b*cos(f*x + e)*sin(f*x + e)))*sin(f*x + e) - 6*(3*a*b - 5*b^2)*cos(f*x + e))/(((a^4 - a^3*b)*f*cos(f*x + e)^4 - a^3*b* f - (a^4 - 2*a^3*b)*f*cos(f*x + e)^2)*sin(f*x + e))]
\[ \int \frac {\csc ^4(e+f x)}{\left (a+b \tan ^2(e+f x)\right )^2} \, dx=\int \frac {\csc ^{4}{\left (e + f x \right )}}{\left (a + b \tan ^{2}{\left (e + f x \right )}\right )^{2}}\, dx \]
Time = 0.31 (sec) , antiderivative size = 115, normalized size of antiderivative = 0.99 \[ \int \frac {\csc ^4(e+f x)}{\left (a+b \tan ^2(e+f x)\right )^2} \, dx=-\frac {\frac {3 \, {\left (3 \, a b - 5 \, b^{2}\right )} \tan \left (f x + e\right )^{4} + 2 \, {\left (3 \, a^{2} - 5 \, a b\right )} \tan \left (f x + e\right )^{2} + 2 \, a^{2}}{a^{3} b \tan \left (f x + e\right )^{5} + a^{4} \tan \left (f x + e\right )^{3}} + \frac {3 \, {\left (3 \, a b - 5 \, b^{2}\right )} \arctan \left (\frac {b \tan \left (f x + e\right )}{\sqrt {a b}}\right )}{\sqrt {a b} a^{3}}}{6 \, f} \]
-1/6*((3*(3*a*b - 5*b^2)*tan(f*x + e)^4 + 2*(3*a^2 - 5*a*b)*tan(f*x + e)^2 + 2*a^2)/(a^3*b*tan(f*x + e)^5 + a^4*tan(f*x + e)^3) + 3*(3*a*b - 5*b^2)* arctan(b*tan(f*x + e)/sqrt(a*b))/(sqrt(a*b)*a^3))/f
Time = 0.59 (sec) , antiderivative size = 134, normalized size of antiderivative = 1.16 \[ \int \frac {\csc ^4(e+f x)}{\left (a+b \tan ^2(e+f x)\right )^2} \, dx=-\frac {\frac {3 \, {\left (\pi \left \lfloor \frac {f x + e}{\pi } + \frac {1}{2} \right \rfloor \mathrm {sgn}\left (b\right ) + \arctan \left (\frac {b \tan \left (f x + e\right )}{\sqrt {a b}}\right )\right )} {\left (3 \, a b - 5 \, b^{2}\right )}}{\sqrt {a b} a^{3}} + \frac {3 \, {\left (a b \tan \left (f x + e\right ) - b^{2} \tan \left (f x + e\right )\right )}}{{\left (b \tan \left (f x + e\right )^{2} + a\right )} a^{3}} + \frac {2 \, {\left (3 \, a \tan \left (f x + e\right )^{2} - 6 \, b \tan \left (f x + e\right )^{2} + a\right )}}{a^{3} \tan \left (f x + e\right )^{3}}}{6 \, f} \]
-1/6*(3*(pi*floor((f*x + e)/pi + 1/2)*sgn(b) + arctan(b*tan(f*x + e)/sqrt( a*b)))*(3*a*b - 5*b^2)/(sqrt(a*b)*a^3) + 3*(a*b*tan(f*x + e) - b^2*tan(f*x + e))/((b*tan(f*x + e)^2 + a)*a^3) + 2*(3*a*tan(f*x + e)^2 - 6*b*tan(f*x + e)^2 + a)/(a^3*tan(f*x + e)^3))/f
Time = 10.62 (sec) , antiderivative size = 108, normalized size of antiderivative = 0.93 \[ \int \frac {\csc ^4(e+f x)}{\left (a+b \tan ^2(e+f x)\right )^2} \, dx=-\frac {\frac {1}{3\,a}+\frac {{\mathrm {tan}\left (e+f\,x\right )}^2\,\left (3\,a-5\,b\right )}{3\,a^2}+\frac {b\,{\mathrm {tan}\left (e+f\,x\right )}^4\,\left (3\,a-5\,b\right )}{2\,a^3}}{f\,\left (b\,{\mathrm {tan}\left (e+f\,x\right )}^5+a\,{\mathrm {tan}\left (e+f\,x\right )}^3\right )}-\frac {\sqrt {b}\,\mathrm {atan}\left (\frac {\sqrt {b}\,\mathrm {tan}\left (e+f\,x\right )}{\sqrt {a}}\right )\,\left (3\,a-5\,b\right )}{2\,a^{7/2}\,f} \]